/*
 * CameraCommDef.h
 *
 *  Created on: Feb 14, 2018
 *      Author: guoxs
 */

#ifndef _CAMERA_CAMERACOMMDEF_H_
#define _CAMERA_CAMERACOMMDEF_H_

#include <sys/time.h>
#include <linux/videodev2.h>

#define VIDEO0_DEV_NODE				"/dev/video0"
#define VIDEO4_DEV_NODE				"/dev/video4"
#define DEF_FORMAT_WIDTH			640
#define DEF_FORMAT_HEIGHT			480
#define DEF_PIXEL_FORMAT			V4L2_PIX_FMT_YUYV
#define DEF_FRAMERATE				30
#define DEF_BUFFERS_COUNT			3

#ifndef V4L2_CTRL_CLASS_USER
#define V4L2_CTRL_CLASS_USER	0x00980000

#define V4L2_CID_BASE			(V4L2_CTRL_CLASS_USER | 0x900)
#define V4L2_CID_BRIGHTNESS		(V4L2_CID_BASE+0)
#define V4L2_CID_CONTRAST		(V4L2_CID_BASE+1)
#define V4L2_CID_SATURATION		(V4L2_CID_BASE+2)
#define V4L2_CID_HUE			(V4L2_CID_BASE+3)
#define V4L2_CID_AUDIO_VOLUME	(V4L2_CID_BASE+5)
#define V4L2_CID_AUDIO_BALANCE	(V4L2_CID_BASE+6)
#define V4L2_CID_AUDIO_BASS		(V4L2_CID_BASE+7)
#define V4L2_CID_AUDIO_TREBLE	(V4L2_CID_BASE+8)
#define V4L2_CID_AUDIO_MUTE		(V4L2_CID_BASE+9)
#define V4L2_CID_AUDIO_LOUDNESS	(V4L2_CID_BASE+10)
#define V4L2_CID_BLACK_LEVEL	(V4L2_CID_BASE+11)
#define V4L2_CID_AUTO_WHITE_BALANCE	(V4L2_CID_BASE+12)
#define V4L2_CID_DO_WHITE_BALANCE	(V4L2_CID_BASE+13)
#define V4L2_CID_RED_BALANCE	(V4L2_CID_BASE+14)
#define V4L2_CID_BLUE_BALANCE	(V4L2_CID_BASE+15)
#define V4L2_CID_GAMMA			(V4L2_CID_BASE+16)
#define V4L2_CID_WHITENESS		(V4L2_CID_GAMMA)
#define V4L2_CID_EXPOSURE		(V4L2_CID_BASE+17)
#define V4L2_CID_AUTOGAIN		(V4L2_CID_BASE+18)
#define V4L2_CID_GAIN			(V4L2_CID_BASE+19)
#define V4L2_CID_HFLIP			(V4L2_CID_BASE+20)
#define V4L2_CID_VFLIP			(V4L2_CID_BASE+21)
#define V4L2_CID_HCENTER		(V4L2_CID_BASE+22)
#define V4L2_CID_VCENTER		(V4L2_CID_BASE+23)
#define V4L2_CID_LASTP1			(V4L2_CID_BASE+24)
#endif

#endif /* _CAMERA_CAMERACOMMDEF_H_ */
